<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
h1{ color:red;}
</style></head>
<body>
<%
request.setCharacterEncoding("utf-8");
String method=request.getMethod();
String xm=request.getParameter("xm");
String age=request.getParameter("age");
%>
<h1>显示用户提交的数据</h1>
<p>提交的方法: <%=method%></p>
<p>姓名: <%=xm%></p>
<p>年龄: <%=age%></p>
</body>
</html>